<?php
	define('INCLUDE_CHECK',1);
	require "functions.php";
	$ignoreAuth=true;
	include_once("../globals.php");
	require_once("{$GLOBALS['srcdir']}/sql.inc");
	require_once("{$GLOBALS['srcdir']}/sha1.js");
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Registro</title>

<link rel="stylesheet" type="text/css" href="demo.css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

 <link rel="stylesheet" type="text/css" href=".../../patients/css/jquery.gritter.css" />
        <link rel="stylesheet" type="text/css" href="../../patients/css/bootstrap.css?v=2" />
        <link rel="stylesheet" type="text/css" href="../../patients/css/whmcs.css?v=3" />
        <link rel="stylesheet" type="text/css" href="../../patients/css/brand.css" />


        <script src="../../patients/js/whmcs.js?v=2"></script>
        <script src="../../patients/js/bootstrap.js?v=2"></script>

<script type="text/javascript" src="script.js"></script>
<script type="text/javascript">
function convertPass(){
    document.getElementById('authpwd').value=SHA1(document.getElementById('pass').value);
}
</script>

</head>

<body>
<div class="navbar navbar-fixed-top">
            <div class="navbar-inner">
                <div class="container">
                    <div class="nav-collapse">

                        <ul class="nav pull-left">

                        </ul>
                    </div><!-- /.nav-collapse -->
                </div>
            </div><!-- /navbar-inner -->
        </div>
		<div style="margin-top: 0px; margin-right: auto; margin-left: auto; clear: both; width: 1040px;">
            <ul style="margin: 20px">
                <li id="sld" style="float: left;"><div id="reg">
                   <!--<div class="logo-left"><a href="<?php echo $rootdir; ?>/registration/"><img src="<?php echo $rootdir; ?>/pic/REGISTRATE_AQUI.png" height="340px"><?php /* echo $logocode; */ ?></a></div>-->
                        <iframe width="393" height="303" src="//www.youtube.com/embed/kpgeFOthnOQ?rel=0" frameborder="0" allowfullscreen></iframe>
                    </div></li>

                <li id="lg" style="float: right;"><div id="login" style="float: right; margin-bottom: 40px;">
                        <div id="div-regForm">

<h1 style="margin-bottom: 20px; font-size: 23px;">Registrar cuenta</h1>

<form id="regForm" action="submit.php" method="post">

<table>
  <tbody>
  <tr>
    <td><label for="email">&iquest;Tipo de cuenta que desea crear?:</label></td>
    <td>
		<div>
			<input style="width: 30px;" type="radio" checked="checked" onclick="cambiarSeleccion(this.id)" value="Paciente" id="regP" name="tipoSeleccion">Paciente</input>
			<!--<input style="width: 30px;" type="radio" onclick="cambiarSeleccion(this.id)" id="regM" value="Medico" name="tipoSeleccion">M&eacute;dico</input>-->
		</div>
	</td>
  </tr>
  <tr>
    <td><label for="email"><span class="red">*</span>Correo electr&oacute;nico:</label></td>
    <td><div class="input-container"><input name="email" id="email" type="text" /></div></td>
  </tr>
  <tr>
    <td><label for="fname">N&uacute;mero de identificaci&oacute;n:</label></td>
    <td><div class="input-container">
			<input name="patient_id" id="patient_id" type="text" />
			<!--<a title="Obtener datos del padron nacional" style="font-size: 10px; float: right; padding-right: 20px;" href="#" id="padron"><img border="0" src="img/search_accounts.png"></a>-->
		</div></td>
  </tr>
  <tr>
    <td><label for="fname"><span class="red">*</span>Nombre:</label></td>
    <td><div class="input-container"><input name="fname" id="fname" type="text" /></div></td>
  </tr>
  <tr>
    <td><label for="lname"><span class="red">*</span>Apellido1:</label></td>
    <td><div class="input-container"><input name="lname1" id="lname1" type="text" /></div></td>
  </tr>
  <tr>
    <td><label for="lname"><span class="red">*</span>Apellido2:</label></td>
    <td><div class="input-container"><input name="lname2" id="lname2" type="text" /></div></td>
  </tr>
  <tr>
    <td><label for="sex"><span class="red">*</span>Sexo:</label></td>
    <td>
    <div class="input-container">
    <select name="sex" id="sex">
    <option value="0">Seleccionar sexo:</option>
    <option value="Male">Hombre</option>
    <option value="Female">Mujer</option>
    </select>
    </div>
    </td>
  </tr> 
  
  <tr>
    <td><label for="country"><span class="red">*</span><?php xl('Country','e'); ?>:</label></td>
    <td>
    <div class="input-container">
		<select name='country'>
			<?php
			$ores = sqlStatement("SELECT option_id, title FROM list_options " .
			  "WHERE list_id = 'country' ORDER BY seq");
			while ($orow = sqlFetchArray($ores)) {
			  echo "    <option value='" . $orow['option_id'] . "'";
			  if ($orow['option_id'] == 'Costa Rica') echo " selected";
			  echo ">" . $orow['title'] . "</option>\n";
			}
			?>
		   </select>
    </div>
    </td>
  </tr>
   <tr>
    <td><label><span class="red">*</span>Fecha nacimiento:</label></td>
    <td>
    <div class="input-container">
    <select id="month" name="month"><option value="0">Mes:</option><?=generate_options(1,12,'callback_month')?></select>
    <select id="day" name="day"><option value="0">D&iacute;a:</option><?=generate_options(1,31)?></select>
	<select id="year" name="year"><option value="0">A&ntilde;o:</option><?=generate_options(date('Y'),1900)?></select>
    </div>
    </td>
  </tr>
  <tr>
    <td><label for="pass"><span class="red">*</span>Contrase&ntilde;a:</label></td>
    <td><div class="input-container"><input name="pass" id="pass" type="password" /><input type="hidden" name="authpwd" id="authpwd"></div></td>
  </tr>
   <tr>
    <td><label for="pass">Celular:</label></td>
    <td><div class="input-container"><input name="celular" id="celular" type="text" /></div></td>
  </tr>
  <!--<tr>
    <td><label for="pass"><?php /*xl('Default Facility','e'); */?>Centro de atenci&oacute;n de Salud:</label></td>
    <td><div class="input-container">
			<select style="width:120px;" name=facility_id>
			<?php
			$fres = sqlStatement("select * from facility where service_location != 0 order by name");
			if ($fres) {
			  for ($iter = 0;$frow = sqlFetchArray($fres);$iter++)
				$result[$iter] = $frow;
			  foreach($result as $iter) {
			?>
			<option value="<?php echo $iter{id};?>"><?php echo $iter{name};?></option>
			<?php
			  }
			}
			?>
			</select>
    </div></td>
  </tr>-->
  <tr class="medico">
    <td><label for="pass">C&oacute;digo Colegio profesional:</label></td>
    <td><div class="input-container"><input name="colegio" id="colegio" type="text" /></div></td>
  </tr>
  <tr class="medico">
    <td><label for="pass">Especialidad:</label></td>
    <td><div class="input-container"><input name="especialidad" id="especialidad" type="text" /></div></td>
  </tr>
  </tbody>
</table>

<div style="text-align: right; padding-right: 47px; margin-top: 20px;">
 <input type="checkbox" name="terminos" value="" style="width: 30px; text-align: right;"><span class="red">*</span>Acepto los <a href="http://www.saludaunclic.com/politicas-uso-paciente.html" target="_blank">t&eacute;rminos y condiciones</a>.
</div>
<div style="text-align: right; margin-top: 25px;">
<input type="submit" value="Continuar" onclick="convertPass();" class="btn btn-primary btn-large"><img alt="working.." src="img/ajax-loader.gif" id="loading">
</div>
</form>
<div id="error">
&nbsp;
</div>

</div>

                    </div></li></ul>

        </div>


         <footer id="footer">
            <div class="maincontainer">
                <div class="row text-center">
                    <h3>&iquest;Qu&eacute; es Salud a un Clic?</h3>
                    <p class="lead">Somos su fuente de informaci&oacute;n en salud desde un solo sitio web. <a href="http://www.saludaunclic.com">Leer m&aacute;s</a></p>			
                        
                    <ul>
                        <li><div class="span4">
                        <div class="well">
                            <h4>Buscar Servicios de Salud</h4>		
                            <a href="http://www.saludaunclic.com/medicos" class="livechatlink">Ver directorio M&eacute;dico</a>
                        </div>
                    </div></li>
                    <li>
                    <div class="span4">
                        <div class="well">
                            <h4>&Uacute;ltimas Publicaciones</h4>
                            <a href="http://www.saludaunclic.com/blog">Ver m&aacute;s</a>
                        </div>
                    </div></li>
                    <li><div class="span4">
                        <div class="well">
                            <h4>Cont&aacute;ctenos</h4>
                            <a href="http://www.saludaunclic.com/contactenos.html">
                               info@saludaunclic.com					</a>
                        </div>
                    </div></li>
                    </ul>
                </div>
            </div>
        </footer>


</body>
</html>
